<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="PersonalpackageCreateDlg" widgetVar="PersonalpackageCreateDialog" modal="true" resizable="false" appendToBody="true" header="#{bundle.CreatePersonalpackageTitle}" closeOnEscape="true">

            <h:form id="PersonalpackageCreateForm">

                <h:panelGroup id="display">
                    <p:panelGrid columns="2">

                        <p:outputLabel value="#{bundle.CreatePersonalpackageLabel_PPackageId}" for="PPackageId" />
                        <p:inputText id="PPackageId" value="#{personalpackageController.selected.PPackageId}" title="#{bundle.CreatePersonalpackageTitle_PPackageId}" required="true" requiredMessage="#{bundle.CreatePersonalpackageRequiredMessage_PPackageId}"/>

                        <p:outputLabel value="#{bundle.CreatePersonalpackageLabel_GPackageId}" for="GPackageId" />
                        <p:selectOneMenu id="GPackageId" value="#{personalpackageController.selected.GPackageId}" required="true" requiredMessage="#{bundle.EditPersonalpackageRequiredMessage_GPackageId}" converter="generalpackageConverter">
                            <f:selectItem itemLabel="#{bundle.SelectOneMessage}"/>
                            <f:selectItems value="#{generalpackageController.items}"
                                           var="GPackageIdItem"
                                           itemValue="#{GPackageIdItem}"
                                           itemLabel="#{GPackageIdItem.GPackageId.toString()}"
                                           />

                        </p:selectOneMenu>

                        <p:outputLabel value="#{bundle.CreatePersonalpackageLabel_userId}" for="userId" />
                        <p:selectOneMenu id="userId" value="#{personalpackageController.selected.userId}" required="true" requiredMessage="#{bundle.EditPersonalpackageRequiredMessage_userId}" converter="userConverter">
                            <f:selectItem itemLabel="#{bundle.SelectOneMessage}"/>
                            <f:selectItems value="#{userController.items}"
                                           var="userIdItem"
                                           itemValue="#{userIdItem}"
                                           itemLabel="#{userIdItem.userId.toString()}"
                                           />

                        </p:selectOneMenu>
                    </p:panelGrid>
                    <p:commandButton actionListener="#{personalpackageController.saveNew}" value="#{bundle.Save}" update="display,:PersonalpackageListForm:datalist,:growl" oncomplete="handleSubmit(xhr,status,args,PersonalpackageCreateDialog);"/>
                    <p:commandButton value="#{bundle.Cancel}" onclick="PersonalpackageCreateDialog.hide()"/>
                </h:panelGroup>

            </h:form>

        </p:dialog>

    </ui:composition>

</html>
